package com.bjgzy.rating.mvp.model;

import com.bjgzy.rating.mvp.contract.WinningWorkContract;
import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.eduhzy.ttw.commonsdk.entity.EntriesData;
import com.eduhzy.ttw.commonsdk.http.CommonApi;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-8-21 18:57:29
 */
@FragmentScope
public class WinningWorkModel extends BaseModel implements WinningWorkContract.Model {


    @Inject
    public WinningWorkModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public Observable<CommonData<List<EntriesData>>> getAwardWorksByResearchId(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(CommonApi.class).getAwardWorksByResearchId(map);
    }
}